package socratesteam.model.common;

import java.sql.Date;
import java.text.SimpleDateFormat;

public class Fecha {

	public static Date utilToSql(java.util.Date utilDate) {
		java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());
		return sqlDate;
	}

	public static java.util.Date stringToUtil(String stringDate) {
		java.util.Date utilDate = null;
		try {
			SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd");
			utilDate = dateFormat.parse(stringDate);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return utilDate;
	}

}
